package com.lyd.basic;

/**
 * @Author:lyd
 **/
public class Test05{
    public static void main(String[] args) {
        //成员变量的访问只看编译时类型
        Base b = new Sub();
        System.out.println(b.x);
    }
}
class Base{
    int x = 1;
}
class Sub extends Base{
    int x = 2;
}